//
//  SZYHBusinessViewController.m
//  苏州银行
//
//  Created by rimi on 15/8/20.
//  Copyright (c) 2015年 IOS. All rights reserved.
//

#import "SZYHBusinessViewController.h"

@interface SZYHBusinessViewController ()
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) NSArray *buttonArray;

@end

static NSString *identifier = @"CELL";
@implementation SZYHBusinessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:223/255.0 alpha:1.000];
    _buttonArray = @[@"储蓄存款",@"存款利率",@"个人贷款",@"贷款利率",@"电子银行",@"银行卡",@"日常缴费",@"个人网银",@"手机银行",@"短信通知"];
    [self initializeUser];
}

- (void)initializeUser
{
    _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(50, 0, self.view.frame.size.width - 100, 64)];
    _scrollView.backgroundColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:223/255.0 alpha:1.000];
    _scrollView.contentSize = CGSizeMake(self.view.bounds.size.width * 1.25, 64);
    [self.view addSubview:_scrollView];
    _scrollView.showsHorizontalScrollIndicator = NO;
    
    for (int i = 0; i < _buttonArray.count; i ++) {
        UIButton *chiocButton = [UIButton buttonWithType:0];
        chiocButton.frame = CGRectMake((20 + 90) * i, 16, 90, 30);
        chiocButton.backgroundColor = [UIColor whiteColor];
        [chiocButton setTitle:_buttonArray[i] forState:0];
        [chiocButton setTitleColor:[UIColor blackColor] forState:0];
        chiocButton.titleLabel.font = [UIFont systemFontOfSize:16];
        chiocButton.titleLabel.shadowColor = [UIColor blackColor];
        chiocButton.titleLabel.shadowOffset = CGSizeMake(2, 1);
        chiocButton.layer.cornerRadius = 5;
        chiocButton.tag = i + 100;
        [chiocButton addTarget:self action:@selector(handleChangeButton:) forControlEvents:UIControlEventTouchUpInside];
        [_scrollView addSubview:chiocButton];
    }
}

- (void)handleChangeButton:(UIButton *)sender
{
    
}

















@end
